import axios from 'axios'

export default class DoctorAuthority {
    static doctorAuthority = null

    static getInstance() {
        if (this.doctorAuthority == null) {
            this.doctorAuthority = new DoctorAuthority()
        }
        return this.doctorAuthority
    }

    //查询所有权限
    list() {
        return axios.get(`http://localhost/authority/authority`)
    }

    //查看所有角色
    getTitle(){
        return axios.get(`http://localhost/authority/authority/title`)
    }
    //查看所有科室
    getDepartment(){
        return axios.get(`http://localhost/authority/authority/department`)
    }

    //添加医生,用户,分配默认权限
    save(HisDoctorEntity){
        return axios.post(`http://localhost/authority/doctorManage`,HisDoctorEntity)
    }
}
